﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace inzDesktop
{
    /// <summary>
    /// Interaction logic for windowDodaj.xaml
    /// </summary>
    public partial class windowDodaj : Window
    {
        private string nazwa;

        public string Nazwa
        {
            get { return this.nazwa; }
            set { this.nazwa = value; }
        }
        public windowDodaj()
        {
            InitializeComponent();
            textBoxNazwa.Focus();
        }

        private void btnAnuluj_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void btnDodaj_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;

            this.Close(); 
        }

        private void textBoxNazwa_TextChanged(object sender, TextChangedEventArgs e)
        {
            this.nazwa = (sender as TextBox).Text;
        }

        
    }
}
